﻿using System;


namespace TMS.ProjectServiceModel
{
    public class PublishStatus : CommonObject
    {
        public PublishStatus()
        {
            PublishDate = DateTime.MinValue.ToUniversalTime();
            FromDate = DateTime.MinValue.ToUniversalTime();
            ToDate = DateTime.MinValue.ToUniversalTime();
        }

        public int ID
        {
            get;
            set;
        }

        public int ProjectId
        {
            get;
            set;
        }

        public int ProjectName
        {
            get;
            set;
        }

        public DateTime PublishDate
        {
            get;
            set;
        }

        public string StrPublishDate
        {
            get
            {
                if (PublishDate == DateTime.MinValue)
                {
                    return "-";
                }
                else
                {
                    return PublishDate.ToString("yyyy-MM-dd HH:mm:ss");
                }
            }
        }

        public string Status
        {
            get;
            set;
        }

        public string Message
        {
            get;
            set;
        }

        public DateTime FromDate
        {
            get;
            set;
        }

        public string From
        {
            get
            {
                if (FromDate == DateTime.MinValue)
                {
                    return "-";
                }
                else
                {
                    return FromDate.ToString("yyyy-MM-dd HH:mm:ss");
                }
            }
        }

        public DateTime ToDate
        {
            get;
            set;
        }

        public string To
        {
            get
            {
                if (ToDate == DateTime.MinValue)
                {
                    return "-";
                }
                else
                {
                    return ToDate.ToString("yyyy-MM-dd HH:mm:ss");
                }
            }
        }

        public string TestEnv
        {
            get;
            set;
        }
    }
}
